Time zero detection of infectious messages

ABSTRACT

Detecting infectious messages comprises performing an individual characteristic analysis of a message to determine whether the message is suspicious, determining whether a similar message has been noted previously in the event that the message is determined to be suspicious, classifying the message according to its individual characteristics and its similarity to the noted message in the event that a similar message has been noted previously.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation claims the priority benefit ofU.S. application Ser. No. 11/927,438 filed Oct. 29, 2007, which is acontinuation of Ser. No. 11/156,372 filed Jun. 16, 2005, which claimsthe priority benefit of U.S. provisional application 60/587,839 filedJul. 13, 2004, the disclosures of which are incorporated herein byreference.

BACKGROUND OF THE INVENTION

Computer viruses and worms are often transmitted via electronicmessages. An infectious message usually comes in the form of an e-mailwith a file attachment, although other forms of infection are possible.Attackers have exploited many protocols that exchange electronicinformation, including email, instant messaging, SQL protocols, HyperText Transfer Protocols (HTTP), Lightweight Directory Access Protocol(LDAP), File Transfer Protocol (FTP), telnet, etc. When the attachmentis opened, the virus executes. Sometimes the virus is launched through alink provided in the email. Virus or worm attacks can cause considerabledamage to organizations. Thus, many anti-virus solutions have beendeveloped to identify viruses and prevent further damage. Currently,most anti-virus products use virus signatures based on known viruses foridentification. Such systems, however, often do not protect the networkeffectively during the time window between a virus' first appearance andthe deployment of its signature. Networks are particularly vulnerableduring this time window, which is referred to as “time zero” or “dayzero”. For a typical anti-virus system to function effectively, itusually requires viruses to be identified, their signatures developedand deployed. Even after the system adapts after an outbreak, time zerothreat can sometimes re-immerge as the virus mutates, rendering the oldsignature obsolete.

One approach to time zero virus detection is to use a content filter toidentify and quarantine any message with a potentially executableattachment. This approach is cumbersome because it could incorrectlyflag attachments in Word, Excel and other frequently used documentformats even if the attachments are harmless, resulting in high rate ofmisidentification (also referred to as false positives). Furthermore,the approach may not be affective if the virus author disguises thenature of the attachment. For example, some virus messages ask therecipients to rename a .txt file as .exe and then click on it. Sometimesthe virus author exploits files that were not previously thought to beexecutable, such as JPEG files. Therefore, it would be useful to have abetter time zero detection technique. It would also be desirable if thetechnique could detect viruses more accurately and generate fewer falsepositives.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 is a system diagram illustrating an embodiment of a messagedelivery system.

FIG. 2 is a flowchart illustrating a process embodiment for detectinginfectious messages.

FIG. 3 is a flowchart illustrating the implementation of the individualmessage analysis according to some embodiments.

FIG. 4 is a flowchart illustrating an embodiment of traffic analysis.

FIG. 5 is a flowchart illustrating another embodiment of trafficanalysis.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess, an apparatus, a system, a composition of matter, a computerreadable medium such as a computer readable storage medium or a computernetwork wherein program instructions are sent over optical or electroniccommunication links. In this specification, these implementations, orany other form that the invention may take, may be referred to astechniques. A component such as a processor or memory described as beingconfigured to perform a task includes both a general component that istemporarily configured to perform the task at a given time or a specificcomponent that is manufactured to perform the task. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Detecting infectious messages is disclosed. Analysis of individualcharacteristics of messages is performed in some embodiments todetermine whether the message is suspicious. If a message is deemedsuspicious, it is determined whether a similar message has been notedpreviously as possibly suspicious. If a similar message has beenpreviously noted, the message is classified according to its individualcharacteristics and its similarity to the noted message. In someembodiments, if a message that was forwarded is later found to beinfectious, the infectious message is reported to human or machineagents for appropriate action to take place.

FIG. 1 is a system diagram illustrating an embodiment of a messagedelivery system. In this example, message forwarding device 102 may beimplemented as a mail server or gateway or other appropriate device. Themessage forwarding device is configured to forward messages received onits input interface. As used herein, forwarding includes sending amessage to email servers or gateways, networking devices, email clientsof individual recipients, or any other appropriate locations in themessage's path of flow. Some of the messages to be forwarded may beinfectious (i.e. containing viruses, worms or other items that may causeunwanted behavior on the recipient's device and/or the network). In thisexample, an infectious message detection mechanism 104 cooperates withthe message forwarding device to identify the virus and preventsinfectious messages from further spreading. In some embodiments, thevirus detection mechanism is implemented as software, firmware,specialized hardware or any other appropriate techniques on the messageforwarding device. In some embodiments, the detection mechanism isimplemented on a separate device.

FIG. 2 is a flowchart illustrating a process embodiment for detectinginfectious messages. Process 200 may be implemented on a messageforwarding device, a standalone device, or as a part of another networkmonitoring/security device for any other appropriate device systems. Inthis example, an individual message analysis is performed initially(202). As will be shown in more details below, the individual messageanalysis evaluates the intrinsic characteristics of the message,determines the probability of the message being infectious, andclassifies the message. In some embodiments, the message is classifiedas legitimate, suspicious or infectious based on the probability. Themessage is determined to be legitimate if the probability is below alegitimate threshold, infectious if the probability exceeds aninfectious threshold, and suspicious if the probability is somewherebetween the two thresholds. Other evaluations and classificationtechniques are used in different embodiments.

In the process shown, if a message is determined to be legitimate, themessage is forwarded to the appropriate recipient (204). If the messageis determined to be infectious, the message is treated as appropriate(206). In some embodiments, the message is quarantined or deleted fromthe delivery queue. If a message is deemed to be suspicious, a trafficanalysis is performed on the suspicious message (208). The trafficanalysis identifies any traffic spike in the e-mail message stream thatis consistent with the pattern of a virus outbreak. Details of thetraffic analysis are described below. In this example, analysis of amessage in the context of all message traffic yields another probabilityof the message being infectious, and classifies the suspicious messageas either legitimate or infectious according to the probability.Legitimate messages are processed normally and forwarded to theirdestinations (204). Infectious messages are treated appropriately (206).Other classifications are also possible. The order of the analyses maybe different in some implementations and some embodiments perform theanalysis in parallel. In some embodiments, each analysis is performedindependently.

FIG. 3 is a flowchart illustrating the implementation of the individualmessage analysis according to some embodiments. In this example, process202 initiates when a message is received (302). The message is thensubmitted to a plurality of tests configured to examine thecharacteristics of the message and detect any anomalies. After eachtest, the probability of the message being infectious is updatedaccording to the test result (318). In some embodiments, the weight ofdifferent test results in calculating the probability may vary.

It is then determined whether the probability exceeds the threshold forthe message to be deemed infectious (320). If so, the message isconsidered infectious and may be quarantined, deleted from send queue,or otherwise appropriately handled. If, however, the probability doesnot exceed the threshold, it is determined whether more tests areavailable (322). If so, the next available test is applied and theprocess of updating probability and testing for threshold is repeated.If no more tests are available, the probability is compared to thethreshold required for a legitimate message (324). If the probabilityexceeds the legitimate threshold, the message is deemed to besuspicious. Otherwise, the tests indicate that the message islegitimate. The classification of the message is passed on to the nextroutine. According to process 200, depending on whether the message islegitimate, suspicious or infectious, the next routine may forward themessage, perform traffic analysis on the message, or treat the messageas infectious.

Examples of the tests used in the individual message analysis includesignature matching tests (304), file name tests (306), character tests(308), bit pattern tests (310), N-gram tests (312), bit pattern test(314), and probabilistic finite state automata (PFSA) tests (316). Thetests may be arranged in any appropriate order. Some tests maybe omittedand different tests may be used.

Some of the tests analyze the intrinsic characteristics of the messageand/or its attachments. In the embodiments shown, the signature matchingtest (304) compares the signature of the message with the signatures ofknown viruses. The test in some embodiments generates a probability on asliding scale, where an exact match leads to a probability of 1, and aninexact match receives a probability value that depends on the degree ofsimilarity.

The file name test (306) examines the name of the attachment anddetermines if there is anomaly. For example, a file name such as “readme.txt.exe” is highly suspicious since it would appear that the senderis attempting to misrepresent the nature of the executable and pass thefile off as a text file.

The character test (308) processes the content of the attachment anddetermines the possibility that the file maybe an infectious one.Characters that are unusual for the message file type indicate that theattachment has a higher likelihood of being infectious. For example,documents that purport to be text documents and contain many charactersmore common to an executable could be suspicious. In some embodiments,the character test examines certain portions of the message that issupposed to contain characters and omit the rest to avoid falsepositives. For example, if a document contains text and pictures, thecharacter test will only process the text portion.

The bit pattern test (310) examines certain portions of the file anddetermines whether there is anomaly. Many files contain embedded bitpatterns that indicate the file type. The magic number or magic sequenceis such a bit pattern. For example, an executable file includes aparticular bit pattern that indicates to the operating system that thefile is an executable. The operating system will execute any file thatstarts with the magic sequence, regardless of the file extension. If anattachment has an extension such as .txt or .doc that seems to indicatethat the file is textual in nature, yet the starting sequence in thefile contains the magic sequence of an executable, then there is a highprobability that the sender is attempting to disguise an executable as atext document. Therefore, the attachment is highly suspicious.

Some of the tests such as N-gram (312) and PFSA (314) measure thedeviation of the received message from a baseline. In this example, thebaseline is built from a collection of known good messages. An N-grammodel describes the properties of the good messages. The N-gram model isa collection of token sequences and the corresponding probability ofeach sequence. The tokens can be characters, words or other appropriateentities. The test compares the N-gram model to an incoming message toestimate the probability that a message is legitimate. The probabilitiesof the N-gram sequences of the incoming messages can be combined withthe probabilities of the N-gram sequences of the baseline model usingany of several methods. In some embodiments, the N-gram test comparesthe test result with a certain threshold to determine the legitimacy ofa message. In some embodiments, a message deemed legitimate by theN-gram test is not subject to further testing, thus reducing falsepositive rate. In some embodiments, a message found to be legitimate bythe N-gram test is further tested to ascertain its true legitimacy.

In the example shown, the PFSA test (314) relies on a model that isbuilt from a set of known good messages. The model describes theproperties of legitimate messages. The model includes a plurality oftoken such as characters and words, and the probabilities associatedwith the tokens. The test estimates the probability that a particularmessage that includes a sequence of tokens can be generated by themodel. In some embodiments, similar to the N-gram test, the test resultis compared with a certain threshold to determine the legitimacy of amessage. In some embodiments, a message deemed legitimate by the PFSAtest is not subject to further testing to avoid false positives. In someembodiments, a message found to be legitimate by the PFSA test isfurther tested to ascertain its true legitimacy.

In some embodiments, information about previously received messages iscollected and used to identify an increase in the number of similar andpotentially suspicious messages. Messages are clustered to establish astatistical model that can be used to detect similar messages. The datacollected may include one or more of the following: time of receipt, therecipients, number of recipients, the sender, size of the attachment,number of attachments, number of executable attachments, file name, fileextension, file type according to the starting sequence of the filebinary, etc. The characteristics of an incoming message are compared tothe model to determine whether similar messages have been notedpreviously. A traffic spike in similar messages that were previouslynoted as potentially suspicious indicates the likelihood of a virusoutbreak.

In some embodiments, traffic patterns are analyzed on a global networklevel. In other words, the analysis may monitor all the messages routedthrough an internet service provider and note the suspicious ones. Insome embodiments, the traffic patterns are analyzed locally. Forexample, messages on a local network or on different subnets of a localnetwork may be analyzed separately. In some embodiments, a combinationof global and local analyses is used.

In local traffic analysis, different subnets can have different trafficpatterns. For example, within a corporation, the traffic on theengineering department subnet may involve a large number of executablesand binary files. Thus, absent other indicators, executables and binaryattachments will not always trigger an alarm. In contrast, the trafficpattern of the accounting department may mostly involve text documentsand spreadsheets, therefore an increase in binary or executableattachments would indicate a potential outbreak. Tailoring trafficanalysis based on local traffic can identify targeted attacks as well asvariants of old viruses.

FIG. 4 is a flowchart illustrating an embodiment of traffic analysis.Process 208 may be performed after the individual message analysis asshown in process 200, before the individual message analysis, incombination with other analysis, or independently. Process 208 initiateswhen a message is received (402). The characteristics of the message arecompared to the characteristics of previously stored suspicious messages(404). In some embodiments, the system collects suspicious messagesresulting from other tests such as the ones in the individual messageanalysis shown in FIG. 3.

It is then determined whether the message is similar to the previousstored messages (406). If the message is not similar to any of thepreviously stored suspicious messages, a low probability ofinfectiousness is assigned. If, however, the message is similar toprevious stored suspicious messages, information associated with thereceived message is also stored and the statistical model is updatedaccordingly (408). It is then determined whether the number of suchsimilar and suspicious messages has exceeded a predefined threshold(410). If not, the message is not classified as infectious at thispoint, although a higher probability may be assigned to it. If the totalnumber of such suspicious messages has exceeded the threshold, it islikely that the message is indeed infectious and should be appropriatelytreated. For example, consider the case where the threshold number isset to 5, and there are already 4 instances of suspicious messages withexecutable attachments having the same extension and similar size. Whena fifth message arrives with similar sized executable attachments withthe same extension, the message will be classified as infectious. Byselecting an appropriate threshold value, infectious messages can bedetected and prevented without a major outbreak.

Sometimes the system may initially find a message to be legitimate ormerely suspicious and forward the message to its destination. Later asmore information becomes available, the system may find the message tobe infectious. FIG. 5 is a flowchart illustrating another embodiment oftraffic analysis. Process 500 may be performed independently or inconjunction with other types of message analyses. In the example shown,a message is received (502). The message is initially determined to belegitimate and forwarded (504). Sometime after the message has beenforwarded, the forwarded message is determined to be infectious (506). Amessage may be found as infectious according to any appropriate messageanalysis techniques, including those described in this specification. Insome embodiments, information pertaining to the forwarded message isoptionally stored in memory, on disk or in other forms of storage mediumso that it can be used for the analysis. Again, consider the examplewhere the threshold number in the traffic analysis is set to 5 and 4similar messages have been received. Although these 4 messages are notedas suspicious, because the threshold is not met the messages are stillforwarded. The characteristics of the suspicious messages are stored.When a similar fifth message is received, its characteristics arecompared to the characteristics of the four previously noted messages.N-gram, PFSA or other appropriate techniques can be used in thecomparison. The analysis shows that the number of similar and suspiciousmessages meets the threshold. Therefore, the fifth message isinfectious, as are the four previously noted and forwarded messages.

Once an already forwarded message is deemed infectious, measures aretaken to prevent the infectious forwarded message from spreading (508).In the example shown above, the system will take actions to keep the 4instances of previously forwarded messages from being opened or resentby their recipients. Additionally, the system will not forward the fifthmessage. In some embodiments, the system reports the finding to thesystem administrator, the recipient, and/or other users on the networkto prevent the previously forwarded infectious messages from furtherspreading. Warning messages, log messages or other appropriatetechniques may be used. In some embodiments, the system generates acancellation request to a forwarding agent such as the mail server,which will attempt to prevent the messages from being forwarded bydeleting them from the send queue, moving the messages into a locationto be quarantined or any other appropriate action.

Detecting and managing infectious messages have been disclosed. Byperforming individual message analysis and/or traffic analysis,infectious messages can be more accurately identified at time zero, andinfectious messages that initially escaped detection can be lateridentified and prevented from further spreading.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A method of detecting infectious messages, themethod comprising: generating a first probability of infection based onan individual characteristic analysis of a message, wherein theindividual characteristic analysis includes comparing the individualcharacteristics of the message to individual characteristics of apreviously received message; generating a second probability ofinfection based on a traffic analysis of the message for identifying aspike in a number of previously received messages similar to themessage, the previously received messages having been classified assuspicious; determining an overall probability of infection based on thefirst probability and the second probability; and classifying themessage as legitimate based on the overall probability meeting athreshold associated with legitimate messages, wherein the message isclassified as suspicious based on failure of the overall probability tomeet the threshold.
 2. The method of claim 1, further comprisingupdating the overall probability and subsequently classifying thesuspicious message as legitimate when the overall probability meets thethreshold.
 3. The method of claim 1, further comprising updating theoverall probability and subsequently classifying the suspicious messageas infectious when the overall probability meets another thresholdassociated with infectiousness.
 4. The method of claim 1, wherein theindividual characteristic analysis comprises a set of one or more tests.5. The method of claim 4, wherein test results from the set of tests areweighted to determine the first probability.
 6. The method of claim 4,wherein the tests are applied in a predetermined order.
 7. The method ofclaim 4, wherein the set of tests for the received message is differentthan a set of tests selected for another received message.
 8. The methodof claim 1, wherein the traffic analysis pertains to one of a globalnetwork, a local network, or a subnet of the local network.
 9. Themethod of claim 1, wherein the traffic analysis pertains to anycombination of a global network, a local network, or a subnet of thelocal network.
 10. A system of detecting infectious messages, the systemcomprising: a processor that executes: a testing module stored inmemory, wherein the testing module is executable to: generate a firstprobability of infection based on an individual characteristic analysisof a message, wherein the individual characteristic analysis includescomparing the individual characteristics of the message to individualcharacteristics of a previously received message, and generate a secondprobability of infection based on a traffic analysis of the message foridentifying a spike in a number of previously received messages similarto the message, the previously received messages having been classifiedas suspicious; instructions stored in memory, wherein the instructionsare executable to determine an overall probability of infection based onthe first probability and the second probability; and a messageclassifier stored in memory, wherein the message classifier isexecutable to classify the message as legitimate based on the overallprobability meeting a threshold associated with legitimate messages,wherein the message is classified as suspicious based on failure of theoverall probability to meet the threshold.
 11. The system of claim 10,wherein the processor executes further instructions to update theoverall probability and to subsequently classify the suspicious messageas legitimate when the overall probability meets the threshold.
 12. Thesystem of claim 10, wherein the processor executes further instructionsto update the overall probability and to subsequently classify thesuspicious message as infectious when the overall probability meetsanother threshold associated with infectiousness.
 13. The system ofclaim 10, wherein the individual characteristic analysis comprises a setof one or more tests.
 14. The system of claim 13, wherein test resultsfrom the set of tests are weighted to determine the first probability.15. The system of claim 13, wherein the tests are applied in apredetermined order.
 16. The system of claim 13, wherein the set oftests for the received message is different than a set of tests selectedfor another received message.
 17. The system of claim 10, wherein thetraffic analysis pertains to one of a global network, a local network,or a subnet of the local network.
 18. The system of claim 10, whereinthe traffic analysis pertains to any combination of a global network, alocal network, or a subnet of the local network.
 19. A non-transitorycomputer-readable storage medium, having embodied thereon a programexecutable by a processor to perform a method of detecting infectiousmessages, the method comprising: generating a first probability ofinfection based on an individual characteristic analysis of a message,wherein the individual characteristic analysis includes comparing theindividual characteristics of the message to individual characteristicsof a previously received message; generating a second probability ofinfection based on a traffic analysis of the message for identifying aspike in a number of previously received messages similar to themessage, the previously received messages having been classified assuspicious; determining an overall probability of infection based on thefirst probability and the second probability; and classifying themessage as legitimate based on the overall probability meeting athreshold associated with legitimate messages, wherein the message isclassified as suspicious based on failure of the overall probability tomeet the threshold.